# 计算所有特征与目标变量（risk_score）的相关性
correlation_matrix_all = diabetes_data.corr()

# 绘制相关性热力图
plt.figure(figsize=(12, 8))
sns.heatmap(correlation_matrix_all, annot=True, cmap='coolwarm', fmt='.2f', cbar=True, linewidths=1, linecolor='black')
plt.title('Correlation Heatmap of All Features with Risk Score')
plt.show()

# 返回相关性矩阵
correlation_matrix_all[['risk_score']]
